package cn.edu.zafu.bigdata.x.hzq;

public class Course {
    // 课程属性
    private String courseId;
    private String courseName;
    private String instructor;
    private int credits;
    private String description;
    // 23:05
    // 2317

    // 构造函数
    public Course(String courseId, String courseName, String instructor, int credits, String description) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.instructor = instructor;
        this.credits = credits;
        this.description = description;
    }

    // Getter和Setter方法
    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getInstructor() {
        return instructor;
    }

    public void setInstructor(String instructor) {
        this.instructor = instructor;
    }

    public int getCredits() {
        return credits;
    }

    public void setCredits(int credits) {
        this.credits = credits;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    // print方法，输出课程信息
    public void print() {
        System.out.println("课程编号: " + courseId);
        System.out.println("课程名称: " + courseName);
        System.out.println("授课教师: " + instructor);
        System.out.println("学分: " + credits);
        System.out.println("课程描述: " + description);
    }

    // 主方法，用于测试Course类
    public static void main(String[] args) {
        // 创建一个Course对象
        Course Course = new Course("CS101", "Java Programming", "Dr. Smith", 3, "This course introduces the basics of Java programming.");
        Course course10087 = new Course("CS101", "Java Programming", "Dr. Smith", 3, "This course introduces the basics of Java programming.");
        // 打印课程信息
        Course.print();
        course10087.print();
    }
}
